package com.wnxy.stu.controller;

import com.wnxy.common.result.Result;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yellow Docter
 * @date 2024 -04-18
 * @desc
 */
@RestController
@RequestMapping("test")
public class TestController {
    @GetMapping("/list/{id}")
    public Result test2(@PathVariable("id") Integer id){
        return Result.ok("我是服务提供者:test2===>" + id);
    }

    @Value("${server.port}")
    private Integer port;

    @GetMapping("/list")
    public Result test3(String name){
        return Result.ok("我是服务提供者:test3===>" + port);
    }
}
